3.3.90 \(\int (f+g x^3) \log (c (d+e x^2)^p) \, dx\) [290]

Optimal. Leaf size=110 \[ -2 f p x+\frac {d g p x^2}{4 e}-\frac {1}{8} g p x^4+\frac {2 \sqrt {d} f p \tan ^{-1}\left (\frac {\sqrt {e} x}{\sqrt {d}}\right )}{\sqrt {e}}-\frac {d^2 g p \log \left (d+e x^2\right )}{4 e^2}+f x \log \left (c \left (d+e x^2\right )^p\right )+\frac {1}{4} g x^4 \log \left (c \left (d+e x^2\right )^p\right ) \]

[Out]

-2*f*p*x+1/4*d*g*p*x^2/e-1/8*g*p*x^4-1/4*d^2*g*p*ln(e*x^2+d)/e^2+f*x*ln(c*(e*x^2+d)^p)+1/4*g*x^4*ln(c*(e*x^2+d
)^p)+2*f*p*arctan(x*e^(1/2)/d^(1/2))*d^(1/2)/e^(1/2)

________________________________________________________________________________________

Rubi [A]
time = 0.07, antiderivative size = 110, normalized size of antiderivative = 1.00, number of steps used = 9, number of rules used = 7, integrand size = 20, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.350, Rules used = {2521, 2498, 327, 211, 2504, 2442, 45} \begin {gather*} \frac {2 \sqrt {d} f p \text {ArcTan}\left (\frac {\sqrt {e} x}{\sqrt {d}}\right )}{\sqrt {e}}+f x \log \left (c \left (d+e x^2\right )^p\right )+\frac {1}{4} g x^4 \log \left (c \left (d+e x^2\right )^p\right )-\frac {d^2 g p \log \left (d+e x^2\right )}{4 e^2}+\frac {d g p x^2}{4 e}-2 f p x-\frac {1}{8} g p x^4 \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(f + g*x^3)*Log[c*(d + e*x^2)^p],x]

[Out]

-2*f*p*x + (d*g*p*x^2)/(4*e) - (g*p*x^4)/8 + (2*Sqrt[d]*f*p*ArcTan[(Sqrt[e]*x)/Sqrt[d]])/Sqrt[e] - (d^2*g*p*Lo
g[d + e*x^2])/(4*e^2) + f*x*Log[c*(d + e*x^2)^p] + (g*x^4*Log[c*(d + e*x^2)^p])/4

Rule 45

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rule 211

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]/a)*ArcTan[x/Rt[a/b, 2]], x] /; FreeQ[{a, b}, x]
&& PosQ[a/b]

Rule 327

Int[((c_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[c^(n - 1)*(c*x)^(m - n + 1)*((a + b*x^n
)^(p + 1)/(b*(m + n*p + 1))), x] - Dist[a*c^n*((m - n + 1)/(b*(m + n*p + 1))), Int[(c*x)^(m - n)*(a + b*x^n)^p
, x], x] /; FreeQ[{a, b, c, p}, x] && IGtQ[n, 0] && GtQ[m, n - 1] && NeQ[m + n*p + 1, 0] && IntBinomialQ[a, b,
 c, n, m, p, x]

Rule 2442

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))*((f_.) + (g_.)*(x_))^(q_.), x_Symbol] :> Simp[(f + g*
x)^(q + 1)*((a + b*Log[c*(d + e*x)^n])/(g*(q + 1))), x] - Dist[b*e*(n/(g*(q + 1))), Int[(f + g*x)^(q + 1)/(d +
 e*x), x], x] /; FreeQ[{a, b, c, d, e, f, g, n, q}, x] && NeQ[e*f - d*g, 0] && NeQ[q, -1]

Rule 2498

Int[Log[(c_.)*((d_) + (e_.)*(x_)^(n_))^(p_.)], x_Symbol] :> Simp[x*Log[c*(d + e*x^n)^p], x] - Dist[e*n*p, Int[
x^n/(d + e*x^n), x], x] /; FreeQ[{c, d, e, n, p}, x]

Rule 2504

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_)^(n_))^(p_.)]*(b_.))^(q_.)*(x_)^(m_.), x_Symbol] :> Dist[1/n, Subst[I
nt[x^(Simplify[(m + 1)/n] - 1)*(a + b*Log[c*(d + e*x)^p])^q, x], x, x^n], x] /; FreeQ[{a, b, c, d, e, m, n, p,
 q}, x] && IntegerQ[Simplify[(m + 1)/n]] && (GtQ[(m + 1)/n, 0] || IGtQ[q, 0]) &&  !(EqQ[q, 1] && ILtQ[n, 0] &&
 IGtQ[m, 0])

Rule 2521

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_)^(n_))^(p_.)]*(b_.))^(q_.)*((f_) + (g_.)*(x_)^(s_))^(r_.), x_Symbol]
:> With[{t = ExpandIntegrand[(a + b*Log[c*(d + e*x^n)^p])^q, (f + g*x^s)^r, x]}, Int[t, x] /; SumQ[t]] /; Free
Q[{a, b, c, d, e, f, g, n, p, q, r, s}, x] && IntegerQ[n] && IGtQ[q, 0] && IntegerQ[r] && IntegerQ[s] && (EqQ[
q, 1] || (GtQ[r, 0] && GtQ[s, 1]) || (LtQ[s, 0] && LtQ[r, 0]))

Rubi steps

\begin {align*} \int \left (f+g x^3\right ) \log \left (c \left (d+e x^2\right )^p\right ) \, dx &=\int \left (f \log \left (c \left (d+e x^2\right )^p\right )+g x^3 \log \left (c \left (d+e x^2\right )^p\right )\right ) \, dx\\ &=f \int \log \left (c \left (d+e x^2\right )^p\right ) \, dx+g \int x^3 \log \left (c \left (d+e x^2\right )^p\right ) \, dx\\ &=f x \log \left (c \left (d+e x^2\right )^p\right )+\frac {1}{2} g \text {Subst}\left (\int x \log \left (c (d+e x)^p\right ) \, dx,x,x^2\right )-(2 e f p) \int \frac {x^2}{d+e x^2} \, dx\\ &=-2 f p x+f x \log \left (c \left (d+e x^2\right )^p\right )+\frac {1}{4} g x^4 \log \left (c \left (d+e x^2\right )^p\right )+(2 d f p) \int \frac {1}{d+e x^2} \, dx-\frac {1}{4} (e g p) \text {Subst}\left (\int \frac {x^2}{d+e x} \, dx,x,x^2\right )\\ &=-2 f p x+\frac {2 \sqrt {d} f p \tan ^{-1}\left (\frac {\sqrt {e} x}{\sqrt {d}}\right )}{\sqrt {e}}+f x \log \left (c \left (d+e x^2\right )^p\right )+\frac {1}{4} g x^4 \log \left (c \left (d+e x^2\right )^p\right )-\frac {1}{4} (e g p) \text {Subst}\left (\int \left (-\frac {d}{e^2}+\frac {x}{e}+\frac {d^2}{e^2 (d+e x)}\right ) \, dx,x,x^2\right )\\ &=-2 f p x+\frac {d g p x^2}{4 e}-\frac {1}{8} g p x^4+\frac {2 \sqrt {d} f p \tan ^{-1}\left (\frac {\sqrt {e} x}{\sqrt {d}}\right )}{\sqrt {e}}-\frac {d^2 g p \log \left (d+e x^2\right )}{4 e^2}+f x \log \left (c \left (d+e x^2\right )^p\right )+\frac {1}{4} g x^4 \log \left (c \left (d+e x^2\right )^p\right )\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.04, size = 110, normalized size = 1.00 \begin {gather*} -2 f p x+\frac {d g p x^2}{4 e}-\frac {1}{8} g p x^4+\frac {2 \sqrt {d} f p \tan ^{-1}\left (\frac {\sqrt {e} x}{\sqrt {d}}\right )}{\sqrt {e}}-\frac {d^2 g p \log \left (d+e x^2\right )}{4 e^2}+f x \log \left (c \left (d+e x^2\right )^p\right )+\frac {1}{4} g x^4 \log \left (c \left (d+e x^2\right )^p\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(f + g*x^3)*Log[c*(d + e*x^2)^p],x]

[Out]

-2*f*p*x + (d*g*p*x^2)/(4*e) - (g*p*x^4)/8 + (2*Sqrt[d]*f*p*ArcTan[(Sqrt[e]*x)/Sqrt[d]])/Sqrt[e] - (d^2*g*p*Lo
g[d + e*x^2])/(4*e^2) + f*x*Log[c*(d + e*x^2)^p] + (g*x^4*Log[c*(d + e*x^2)^p])/4

________________________________________________________________________________________

Maple [C] Result contains higher order function than in optimal. Order 9 vs. order 3.
time = 0.42, size = 402, normalized size = 3.65

method result size
risch \(\left (\frac {1}{4} g \,x^{4}+f x \right ) \ln \left (\left (e \,x^{2}+d \right )^{p}\right )+\frac {i \pi g \,x^{4} \mathrm {csgn}\left (i c \left (e \,x^{2}+d \right )^{p}\right )^{2} \mathrm {csgn}\left (i c \right )}{8}+\frac {i \pi g \,x^{4} \mathrm {csgn}\left (i \left (e \,x^{2}+d \right )^{p}\right ) \mathrm {csgn}\left (i c \left (e \,x^{2}+d \right )^{p}\right )^{2}}{8}-\frac {i \pi f \,\mathrm {csgn}\left (i \left (e \,x^{2}+d \right )^{p}\right ) \mathrm {csgn}\left (i c \left (e \,x^{2}+d \right )^{p}\right ) \mathrm {csgn}\left (i c \right ) x}{2}-\frac {i \pi f \mathrm {csgn}\left (i c \left (e \,x^{2}+d \right )^{p}\right )^{3} x}{2}+\frac {i \pi f \mathrm {csgn}\left (i c \left (e \,x^{2}+d \right )^{p}\right )^{2} \mathrm {csgn}\left (i c \right ) x}{2}-\frac {i \pi g \,x^{4} \mathrm {csgn}\left (i \left (e \,x^{2}+d \right )^{p}\right ) \mathrm {csgn}\left (i c \left (e \,x^{2}+d \right )^{p}\right ) \mathrm {csgn}\left (i c \right )}{8}-\frac {i \pi g \,x^{4} \mathrm {csgn}\left (i c \left (e \,x^{2}+d \right )^{p}\right )^{3}}{8}+\frac {i \pi f \,\mathrm {csgn}\left (i \left (e \,x^{2}+d \right )^{p}\right ) \mathrm {csgn}\left (i c \left (e \,x^{2}+d \right )^{p}\right )^{2} x}{2}+\frac {\ln \left (c \right ) g \,x^{4}}{4}-\frac {g p \,x^{4}}{8}+\frac {d g p \,x^{2}}{4 e}-\frac {d^{2} \ln \left (-\sqrt {-e d}\, x +d \right ) g p}{4 e^{2}}+\frac {\sqrt {-e d}\, \ln \left (-\sqrt {-e d}\, x +d \right ) f p}{e}+\ln \left (c \right ) f x -\frac {d^{2} \ln \left (\sqrt {-e d}\, x +d \right ) g p}{4 e^{2}}-2 f p x -\frac {\sqrt {-e d}\, \ln \left (\sqrt {-e d}\, x +d \right ) f p}{e}\) \(402\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((g*x^3+f)*ln(c*(e*x^2+d)^p),x,method=_RETURNVERBOSE)

[Out]

(1/4*g*x^4+f*x)*ln((e*x^2+d)^p)+1/8*I*Pi*g*x^4*csgn(I*c*(e*x^2+d)^p)^2*csgn(I*c)+1/8*I*Pi*g*x^4*csgn(I*(e*x^2+
d)^p)*csgn(I*c*(e*x^2+d)^p)^2-1/2*I*Pi*f*csgn(I*(e*x^2+d)^p)*csgn(I*c*(e*x^2+d)^p)*csgn(I*c)*x-1/2*I*Pi*f*csgn
(I*c*(e*x^2+d)^p)^3*x+1/2*I*Pi*f*csgn(I*c*(e*x^2+d)^p)^2*csgn(I*c)*x-1/8*I*Pi*g*x^4*csgn(I*(e*x^2+d)^p)*csgn(I
*c*(e*x^2+d)^p)*csgn(I*c)-1/8*I*Pi*g*x^4*csgn(I*c*(e*x^2+d)^p)^3+1/2*I*Pi*f*csgn(I*(e*x^2+d)^p)*csgn(I*c*(e*x^
2+d)^p)^2*x+1/4*ln(c)*g*x^4-1/8*g*p*x^4+1/4*d*g*p*x^2/e-1/4/e^2*d^2*ln(-(-e*d)^(1/2)*x+d)*g*p+(-e*d)^(1/2)/e*l
n(-(-e*d)^(1/2)*x+d)*f*p+ln(c)*f*x-1/4/e^2*d^2*ln((-e*d)^(1/2)*x+d)*g*p-2*f*p*x-(-e*d)^(1/2)/e*ln((-e*d)^(1/2)
*x+d)*f*p

________________________________________________________________________________________

Maxima [A]
time = 0.50, size = 89, normalized size = 0.81 \begin {gather*} -\frac {1}{8} \, {\left (2 \, d^{2} g e^{\left (-3\right )} \log \left (x^{2} e + d\right ) - 16 \, \sqrt {d} f \arctan \left (\frac {x e^{\frac {1}{2}}}{\sqrt {d}}\right ) e^{\left (-\frac {3}{2}\right )} + {\left (g x^{4} e - 2 \, d g x^{2} + 16 \, f x e\right )} e^{\left (-2\right )}\right )} p e + \frac {1}{4} \, {\left (g x^{4} + 4 \, f x\right )} \log \left ({\left (x^{2} e + d\right )}^{p} c\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((g*x^3+f)*log(c*(e*x^2+d)^p),x, algorithm="maxima")

[Out]

-1/8*(2*d^2*g*e^(-3)*log(x^2*e + d) - 16*sqrt(d)*f*arctan(x*e^(1/2)/sqrt(d))*e^(-3/2) + (g*x^4*e - 2*d*g*x^2 +
 16*f*x*e)*e^(-2))*p*e + 1/4*(g*x^4 + 4*f*x)*log((x^2*e + d)^p*c)

________________________________________________________________________________________

Fricas [A]
time = 0.40, size = 227, normalized size = 2.06 \begin {gather*} \left [\frac {1}{8} \, {\left (2 \, d g p x^{2} e + 8 \, \sqrt {-d e^{\left (-1\right )}} f p e^{2} \log \left (\frac {x^{2} e + 2 \, \sqrt {-d e^{\left (-1\right )}} x e - d}{x^{2} e + d}\right ) + 2 \, {\left (g x^{4} + 4 \, f x\right )} e^{2} \log \left (c\right ) - {\left (g p x^{4} + 16 \, f p x\right )} e^{2} - 2 \, {\left (d^{2} g p - {\left (g p x^{4} + 4 \, f p x\right )} e^{2}\right )} \log \left (x^{2} e + d\right )\right )} e^{\left (-2\right )}, \frac {1}{8} \, {\left (2 \, d g p x^{2} e + 16 \, \sqrt {d} f p \arctan \left (\frac {x e^{\frac {1}{2}}}{\sqrt {d}}\right ) e^{\frac {3}{2}} + 2 \, {\left (g x^{4} + 4 \, f x\right )} e^{2} \log \left (c\right ) - {\left (g p x^{4} + 16 \, f p x\right )} e^{2} - 2 \, {\left (d^{2} g p - {\left (g p x^{4} + 4 \, f p x\right )} e^{2}\right )} \log \left (x^{2} e + d\right )\right )} e^{\left (-2\right )}\right ] \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((g*x^3+f)*log(c*(e*x^2+d)^p),x, algorithm="fricas")

[Out]

[1/8*(2*d*g*p*x^2*e + 8*sqrt(-d*e^(-1))*f*p*e^2*log((x^2*e + 2*sqrt(-d*e^(-1))*x*e - d)/(x^2*e + d)) + 2*(g*x^
4 + 4*f*x)*e^2*log(c) - (g*p*x^4 + 16*f*p*x)*e^2 - 2*(d^2*g*p - (g*p*x^4 + 4*f*p*x)*e^2)*log(x^2*e + d))*e^(-2
), 1/8*(2*d*g*p*x^2*e + 16*sqrt(d)*f*p*arctan(x*e^(1/2)/sqrt(d))*e^(3/2) + 2*(g*x^4 + 4*f*x)*e^2*log(c) - (g*p
*x^4 + 16*f*p*x)*e^2 - 2*(d^2*g*p - (g*p*x^4 + 4*f*p*x)*e^2)*log(x^2*e + d))*e^(-2)]

________________________________________________________________________________________

Sympy [A]
time = 17.35, size = 214, normalized size = 1.95 \begin {gather*} \begin {cases} \left (f x + \frac {g x^{4}}{4}\right ) \log {\left (0^{p} c \right )} & \text {for}\: d = 0 \wedge e = 0 \\- 2 f p x + f x \log {\left (c \left (e x^{2}\right )^{p} \right )} - \frac {g p x^{4}}{8} + \frac {g x^{4} \log {\left (c \left (e x^{2}\right )^{p} \right )}}{4} & \text {for}\: d = 0 \\\left (f x + \frac {g x^{4}}{4}\right ) \log {\left (c d^{p} \right )} & \text {for}\: e = 0 \\- \frac {d^{2} g \log {\left (c \left (d + e x^{2}\right )^{p} \right )}}{4 e^{2}} + \frac {2 d f p \log {\left (x - \sqrt {- \frac {d}{e}} \right )}}{e \sqrt {- \frac {d}{e}}} - \frac {d f \log {\left (c \left (d + e x^{2}\right )^{p} \right )}}{e \sqrt {- \frac {d}{e}}} + \frac {d g p x^{2}}{4 e} - 2 f p x + f x \log {\left (c \left (d + e x^{2}\right )^{p} \right )} - \frac {g p x^{4}}{8} + \frac {g x^{4} \log {\left (c \left (d + e x^{2}\right )^{p} \right )}}{4} & \text {otherwise} \end {cases} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((g*x**3+f)*ln(c*(e*x**2+d)**p),x)

[Out]

Piecewise(((f*x + g*x**4/4)*log(0**p*c), Eq(d, 0) & Eq(e, 0)), (-2*f*p*x + f*x*log(c*(e*x**2)**p) - g*p*x**4/8
 + g*x**4*log(c*(e*x**2)**p)/4, Eq(d, 0)), ((f*x + g*x**4/4)*log(c*d**p), Eq(e, 0)), (-d**2*g*log(c*(d + e*x**
2)**p)/(4*e**2) + 2*d*f*p*log(x - sqrt(-d/e))/(e*sqrt(-d/e)) - d*f*log(c*(d + e*x**2)**p)/(e*sqrt(-d/e)) + d*g
*p*x**2/(4*e) - 2*f*p*x + f*x*log(c*(d + e*x**2)**p) - g*p*x**4/8 + g*x**4*log(c*(d + e*x**2)**p)/4, True))

________________________________________________________________________________________

Giac [A]
time = 3.27, size = 117, normalized size = 1.06 \begin {gather*} -\frac {1}{4} \, d^{2} g p e^{\left (-2\right )} \log \left (x^{2} e + d\right ) + 2 \, \sqrt {d} f p \arctan \left (\frac {x e^{\frac {1}{2}}}{\sqrt {d}}\right ) e^{\left (-\frac {1}{2}\right )} + \frac {1}{8} \, {\left (2 \, g p x^{4} e \log \left (x^{2} e + d\right ) - g p x^{4} e + 2 \, g x^{4} e \log \left (c\right ) + 2 \, d g p x^{2} + 8 \, f p x e \log \left (x^{2} e + d\right ) - 16 \, f p x e + 8 \, f x e \log \left (c\right )\right )} e^{\left (-1\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((g*x^3+f)*log(c*(e*x^2+d)^p),x, algorithm="giac")

[Out]

-1/4*d^2*g*p*e^(-2)*log(x^2*e + d) + 2*sqrt(d)*f*p*arctan(x*e^(1/2)/sqrt(d))*e^(-1/2) + 1/8*(2*g*p*x^4*e*log(x
^2*e + d) - g*p*x^4*e + 2*g*x^4*e*log(c) + 2*d*g*p*x^2 + 8*f*p*x*e*log(x^2*e + d) - 16*f*p*x*e + 8*f*x*e*log(c
))*e^(-1)

________________________________________________________________________________________

Mupad [B]
time = 0.92, size = 94, normalized size = 0.85 \begin {gather*} f\,x\,\ln \left (c\,{\left (e\,x^2+d\right )}^p\right )-\frac {g\,p\,x^4}{8}-2\,f\,p\,x+\frac {g\,x^4\,\ln \left (c\,{\left (e\,x^2+d\right )}^p\right )}{4}+\frac {d\,g\,p\,x^2}{4\,e}+\frac {2\,\sqrt {d}\,f\,p\,\mathrm {atan}\left (\frac {\sqrt {e}\,x}{\sqrt {d}}\right )}{\sqrt {e}}-\frac {d^2\,g\,p\,\ln \left (e\,x^2+d\right )}{4\,e^2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(log(c*(d + e*x^2)^p)*(f + g*x^3),x)

[Out]

f*x*log(c*(d + e*x^2)^p) - (g*p*x^4)/8 - 2*f*p*x + (g*x^4*log(c*(d + e*x^2)^p))/4 + (d*g*p*x^2)/(4*e) + (2*d^(
1/2)*f*p*atan((e^(1/2)*x)/d^(1/2)))/e^(1/2) - (d^2*g*p*log(d + e*x^2))/(4*e^2)

________________________________________________________________________________________